﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }

    protected void btnLeftDoor_Click(object sender, ImageClickEventArgs e)
    {
        if (Request.Cookies["loginCookie"] != null)
        {
            HttpCookie cookie = Request.Cookies["loginCookie"];
            cookie.Expires = DateTime.Today.AddMinutes(-10);
            Response.Cookies.Add(cookie);
        }
        Response.Redirect("~/Divisions.aspx?" + btnLeftDoor.CommandArgument);
    }

    protected void btnRightDoor_Click(object sender, ImageClickEventArgs e)
    {
        if (Request.Cookies["loginCookie"] != null)
        {
            Response.Redirect("~/Divisions.aspx?2");
        }
        else
        {
            Response.Redirect("~/Login.aspx");
        }
    }
}